package com.group.eams.pojo.entity;

import com.group.eams.pojo.vo.*;

public class ApplicationList {

    private ApplicationList(){}
    // 1.封装资产申领表数据
    public static ApplicationListVo getApplicationListVo(AssetClaimListVo assetClaimListVo) {
        ApplicationListVo applicationListVo = new ApplicationListVo();
        applicationListVo.setTitle(assetClaimListVo.getTitle());
        applicationListVo.setApplicationNum(assetClaimListVo.getApplicationNum());
        applicationListVo.setApplicationDate(assetClaimListVo.getApplicationDate());
        applicationListVo.setApplicationType(1);
        applicationListVo.setApplicant(assetClaimListVo.getApplicant());
        applicationListVo.setStatus(assetClaimListVo.getState());
        applicationListVo.setCreator(assetClaimListVo.getCreator());
        applicationListVo.setCreated(assetClaimListVo.getCreated());
        return applicationListVo;
    }

    // 2.封装资产借出表数据
    public static ApplicationListVo getApplicationListVo(AssetBorrowListVo assetBorrowListVo) {
        ApplicationListVo applicationListVo = new ApplicationListVo();
        applicationListVo.setTitle(assetBorrowListVo.getTitle());
        applicationListVo.setApplicationNum(assetBorrowListVo.getApplicationNum());
        applicationListVo.setApplicationDate(assetBorrowListVo.getApplicationDate());
        applicationListVo.setApplicationType(2);
        applicationListVo.setApplicant(assetBorrowListVo.getApplicationPerson());
        applicationListVo.setStatus(assetBorrowListVo.getStatus());
        applicationListVo.setCreator(assetBorrowListVo.getCreatorPerson());
        applicationListVo.setCreated(assetBorrowListVo.getCreated());
        return applicationListVo;
    }

    // 3.封装资产归还表数据
    public static ApplicationListVo getApplicationListVo(AssetReturnListVo assetReturnListVo) {
        ApplicationListVo applicationListVo = new ApplicationListVo();
        applicationListVo.setTitle(assetReturnListVo.getTitle());
        applicationListVo.setApplicationNum(assetReturnListVo.getApplicationNum());
        applicationListVo.setApplicationDate(assetReturnListVo.getApplicationDate());
        applicationListVo.setApplicationType(3);
        applicationListVo.setApplicant(assetReturnListVo.getApplicationPerson());
        applicationListVo.setStatus(assetReturnListVo.getStatus());
        applicationListVo.setCreator(assetReturnListVo.getCreatorPerson());
        applicationListVo.setCreated(assetReturnListVo.getCreated());
        return applicationListVo;
    }

}
